package com.ruoyi.gis.service.impl;

import java.util.List;

import cn.hutool.core.util.IdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gis.mapper.DatasetGroupMapper;
import com.ruoyi.gis.domain.DatasetGroup;
import com.ruoyi.gis.service.IDatasetGroupService;

/**
 * datasetService业务层处理
 *
 * @author rww
 * @date 2024-08-26
 */
@Service
public class DatasetGroupServiceImpl implements IDatasetGroupService
{
    @Autowired
    private DatasetGroupMapper datasetGroupMapper;

    /**
     * 查询dataset
     *
     * @param id dataset主键
     * @return dataset
     */
    @Override
    public DatasetGroup selectDatasetGroupById(String id)
    {
        return datasetGroupMapper.selectDatasetGroupById(id);
    }

    /**
     * 查询dataset列表
     *
     * @param datasetGroup dataset
     * @return dataset
     */
    @Override
    public List<DatasetGroup> selectDatasetGroupList(DatasetGroup datasetGroup)
    {
        return datasetGroupMapper.selectDatasetGroupList(datasetGroup);
    }

    /**
     * 新增dataset
     *
     * @param datasetGroup dataset
     * @return 结果
     */
    @Override
    public int insertDatasetGroup(DatasetGroup datasetGroup)
    {
        datasetGroup.setId(IdUtil.getSnowflakeNextIdStr());
        return datasetGroupMapper.insertDatasetGroup(datasetGroup);
    }

    /**
     * 修改dataset
     *
     * @param datasetGroup dataset
     * @return 结果
     */
    @Override
    public int updateDatasetGroup(DatasetGroup datasetGroup)
    {
        return datasetGroupMapper.updateDatasetGroup(datasetGroup);
    }

    /**
     * 批量删除dataset
     *
     * @param ids 需要删除的dataset主键
     * @return 结果
     */
    @Override
    public int deleteDatasetGroupByIds(String[] ids)
    {
        return datasetGroupMapper.deleteDatasetGroupByIds(ids);
    }

    /**
     * 删除dataset信息
     *
     * @param id dataset主键
     * @return 结果
     */
    @Override
    public int deleteDatasetGroupById(String id)
    {
        return datasetGroupMapper.deleteDatasetGroupById(id);
    }
}
